In [1]:
import plotly.offline as pyo

from plotly.graph_objs import *

import chart_studio.plotly as py

import pandas as pd
from pandas import DataFrame
In [2]:
pyo.offline.init_notebook_mode()
In [6]:
trace = [{'type' : 'scatter'}]
layout = {'annotations' : [{'text' : 'Left of the plotting area',
           'font' : {'size' : 20},
           'xref' : 'paper',
           'yref' : 'paper',
           'x' : -0.3,
           'y' : 0,
           'showarrow' : False},
          {'text' : 'Right of the plotting area',
           'font' : {'size' : 20},
           'xref' : 'paper',
           'yref' : 'paper',
           'x' : 1.3,
           'y' : 0,
           'showarrow' : False},
          {'text' : 'Below the plotting area',
           'font' : {'size' : 20},
           'xref' : 'paper',
           'yref' : 'paper',
           'x' : 0,
           'y' : -0.5,
           'showarrow' : False},
          {'text' : 'Above the plotting area',
           'font' : {'size' : 20},
           'xref' : 'paper',
           'yref' : 'paper',
           'x' : 1.05,
           'y' : 1.6,
           'showarrow' : False}]}
fig = Figure(data=trace, layout=layout)
pyo.iplot(fig)
In [7]:
fig['layout'].update({'height' : 600, 'width' : 800})
pyo.iplot(fig)
In [8]:
fig['layout'].update({'margin' : {'b' : 250}})
pyo.iplot(fig)
In [9]:
fig['layout'].update({'margin' : {'t' : 250}})
pyo.iplot(fig)
In [10]:
fig['layout'].update({'margin' : {'l' : 300, 'r' : 300}})
pyo.iplot(fig)
In [ ]: